<%--
  ~ Copyright (c) 2015. For Intelligent Group.
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%--<%@page import="java.util.Date"%>--%>

<div class="page-footer">
    <div class="row">
        <div class="col-xs-12 col-sm-6">
            <span class="txt-color-white"><spring:message code="GLOBAL_FOOTER" arguments="${project.version}"/> </span>
            <span class="txt-color-white"><a href="#release">&nbsp;&nbsp;<spring:message code="RELEASE_HISTORY"/></a> </span>
        </div>

        <div class="col-xs-6 col-sm-6 text-right hidden-xs">
            <div class="txt-color-white inline-block">
                <i class="txt-color-blueLight hidden-mobile"><spring:message code="FOOTER_ACCOUNT_ACTIVITY"/> <i class="fa fa-clock-o"></i>
                    <strong>
                        <c:set var="nowDate" value="<%=System.currentTimeMillis()%>"></c:set>
                        <c:set var="showTime" value="${nowDate - sessionScope.user.lastLoginTime.getTime()}"></c:set>
                        <c:choose>
                            <c:when test="${showTime < 3600000}">
                                <c:if test="${showTime / 60000 < 1}">
                                    <spring:message code="FOOTER_ACCOUNT_ACTIVITY_J"/>
                                </c:if>
                                <c:if test="${showTime / 60000 >= 1}">
                                    <fmt:parseNumber integerOnly="true" value="${showTime / 60000}"/> <spring:message code="FOOTER_ACCOUNT_ACTIVITY_M"/>
                                </c:if>
                            </c:when>
                            <c:otherwise>
                                <spring:message var="format" code='APP_DATE_FORMAT_FULL'/>
                                <fmt:formatDate value="${sessionScope.user.lastLoginTime}" pattern="${format}"/>
                            </c:otherwise>
                        </c:choose>
                    </strong> </i>
            </div>
        </div>
    </div>
</div>